#ifndef CMD_EXECUTOR_H
#define CMD_EXECUTOR_H
#include <vector>

namespace vpm 
{
	namespace cmo 
	{
		class CmdExecutor 
		{
		public:
			CmdExecutor(const std::string & cmd= std::string()):m_command(cmd)
			{		
			}

			virtual ~CmdExecutor()
			{
			}

			const std::string & command() const 
			{
				return m_command; 
			}

			void command(const std::string & cmd )
			{
				m_command = cmd; 
			}

			virtual void set_cmdword(int index, const std::string & cmdWord)
			{
                m_cmdWords.push_back(cmdWord);
			}

            std::string get_cmdword(int index) const 
            {
                if ((unsigned int)index < m_cmdWords.size())
                {
                    return m_cmdWords[index];
                }
                return std::string();
            }

			virtual void operator ()( const std::string & cmd)
			{

			}
		protected:
			std::string m_command; 
            std::vector<std::string> m_cmdWords; 
		};

		typedef boost::shared_ptr<CmdExecutor> CmdExecutorPtr; 
	}
}

#endif //  

